<form name='open_from' id='open_from' action="<{link app=desktop ctl=queue act=redoSend}>" method="post">
    <input id="queue_id" type='hidden' name='queue_id' value="<{$queue_id}>">

    <div class="tableform">
        <div id="load" class="division" style="text-align: center">
            请求中...
        </div>
        <div id="res" style="display: none">
            <div id="result">请求状态：</div>
            <div id="data" style="word-wrap: break-word;word-break: normal;">返回数据：</div>
        </div>
    </div>
    <div class="table-action">
        <{button label="确定" type="button" class="btn-primary" id="open_button" style="display:none"}>
    </div>
</form>

<script>
    (function () {

        var _form = $('open_from');

        var result = $("result");

        var queueId = $('queue_id').get('value');

        window.addEvent('domready', function () {
            new Request.JSON({
                url: '<{link app=desktop ctl="queue" act="redoSend"}>',
                data: {'queue_id': queueId},
                method: 'post',
                onSuccess: function (data) {
                    $('res').setStyle('display', '');

                    $('load').setStyle('display', 'none');
                    btn.setStyle('display', '');

                    result.appendText(data.msg);
                    if (data.status) {
                        $('data').appendText(JSON.stringify(data.data));
                    } else {

                    }
                }
            }).send();
        });

        var btn = $('open_button');
        btn.addEvent('click', function () {
            window.location.reload();
        });

    })();

</script>